package com.bjc.principle.factorymethod.pizza;

/**
 * @program: DesignPattern
 * @description: 工厂模式
 * @author: bjc
 * @create: 2020-12-16 19:42
 */
public abstract class Pizza {

    protected String name;

    //准备原材料
    public abstract void prepare();

    public void bake(){
        System.out.println(name+"baking..");
    }

    public void cut(){
        System.out.println(name+"cutting..");
    }

    //打包
    public void box(){
        System.out.println(name+"boxing..");
    }

    public void setName(String name){
        this.name = name;
    }
}
